<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ViewData.aspx.cs" Inherits="ViewData" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>View Items</title>
</head>
<body>
    <form id="ListForm" runat="server">
    <div>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Caption="Item List"
            DataSourceID="ItemList" DataKeyNames="MailId">
            <Columns>
                <asp:BoundField DataField="MailId" HeaderText="MailId" SortExpression="MailId" />
                <asp:BoundField DataField="mailFrom" HeaderText="mailFrom" SortExpression="mailFrom" />
                <asp:BoundField DataField="mailSubject" HeaderText="mailSubject" SortExpression="mailSubject" />
            </Columns>
        </asp:GridView>
        <asp:HyperLink ID="InsertItem" runat="server" NavigateUrl="~/InsertItem.aspx">Add New Item</asp:HyperLink>
        <asp:ObjectDataSource ID="ItemList" runat="server" SelectMethod="GetAllItems" TypeName="NHibernate.Example.Web.Persistence.ItemList">
        </asp:ObjectDataSource>
    </div>
    </form>
</body>
</html>
